<!DOCTYPE html>
<!--商品页-->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="../../layui/css/layui.css">
</head>
<body>
<h1>大家好</h1>
<button type="button" class="layui-btn" id="test1">
    <i class="layui-icon">&#xe67c;</i>上传图片
</button>
<script src="../../layui/jquery-3.6.0.js"></script>
<script src="../../layui/layui.js"></script>
<script>
    layui.use('upload', function(){
        var upload = layui.upload;


        upload.render({
            elem: '#test1'
            ,url: "/upload"
            ,done: function(res){

            }
        });

    });
</script>
</body>
</html>